home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
GET-PUTP.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
4KB
|
67 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME GET-PUTP.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NBV1.INC"
CLS
SCREEN 12
CLS
GraphicSETUP
? "┌───────────────────────────────────────────────────────────────────────
? "│ fGetParr?? ( C1%, R1%, C2%, R2%, ANYnumber, Plane? )
? "│ PutParr ( C1%, R1%, ANYnumber, Pmode?, Plane? )
? "├───────────────────────────────────────────────────────────────────────
? "│ Like the GET and PUT statements in PowerBASIC except that they work on
? "│ a single plane of the graphics screen to store the <monochrome> image
? "│ stored there. What you do with the data after that is limited only to
? "│ your immagination.
? "│ SEE the internal help screens for full details on fGetXxxx and PutXxxx
? "└───────────────────────────────────────────────────────────────────────
'┌───────────────────────────
C1% = 0 : C2% = 99 '│ box coordinates
R1% = 250 : R2% = 349 '│
C? = 1 '│ starting color (plane 0)
DO '│
GBoxDRAW C1%, R1%, C2%, R2%, 0, 3, C? '│ draw a box
INCR C1%, 15 : DECR C2%, 15 '│ decr box size
INCR R1%, 15 : DECR R2%, 15 '│
INCR C?, C? '│ colors = 1, 2, 4, 8
LOOP UNTIL C? > 8 '│ planes = 0, 1, 2, 3
'│
Size% = fBMPwords%( 100, 100 ) '│ create a buffer for data
DIM Buf%( Size% ) '│
Buf_Ptr??? = VARPTR32( Buf%(0) ) '│ 32bit pointer works too
'│
DELAY 1 '│ pause for effect
'│
FOR Pl? = 0 TO 3 '│
fGetPArr 0, 250, 99, 349, Buf%(0), Pl? '│ get the plane data
PutPArr 101, 250, Buf%(0), 2, 3-Pl? '│ put back in reverse order
FOR P? = 0 TO 3 '│ put same data to all
PutParr 202, 250, BYVAL Buf_Ptr???, 1, P? '│ 4 planes ( 15 = white )
DELAY .3 '│
NEXT '│ notice that the "OFF"
DELAY .5 '│ pixels are NOT being put
NEXT '│
PutParr 303, 250, BYVAL Buf_Ptr???, 4, 0 '│ Pmode? = 0 AND
'│ Pmode? = 1 OR
WHILE NOT INSTAT : WEND '│ Pmode? = 2 XOR
CLS '│ Pmode? = 3 PSET
SCREEN 0 '│ Pmode? = 4 PRESET
'└───────────────────────────